<script setup lang="ts">
import { onMounted, reactive, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
// const router = useRouter()

const tableData = reactive([
  {
    id: '1',
    name: '事项1',
    status: false,
    desc: '下午吃哈密瓜',
  },
])
const route = useRoute()
const current = ref({})
onMounted(async () => {
  // await router.isReady()
  const currentLine = tableData.filter((item) => item.id == route.query.id)
  console.log(currentLine)
  current.value = currentLine[0]
})
</script>
<template>
  <div>
    <div>事件名称：{{ current.name }}</div>
    <div>事件状态：{{ current.status ? '完成' : '未完成' }}</div>
    <div>事件描述：{{ current.desc }}</div>
  </div>
</template>
